The invention relates to an addressing process for the storage of data in memories of SDRAM type.
Digital video processing typically requires that video images be stored in memory. Two types of memories are commonly used for storing video images:
Static Random Access Memories (SRAMs). The areas of these memories are directly accessible from the address bus.
Dynamic Random Access Memories (DRAMs), or, if they are synchronous, Synchronous Dynamic Random Access Memories (SDRAMs).
Dynamic memory is split into pages and access to a new page (corresponding to a change of page) requires an access time referred to as a xe2x80x9ctime penaltyxe2x80x9d. A memory address is composed of a first part referred to as the page address or xe2x80x9crow addressxe2x80x9d and of a second part referred to as the binary address or xe2x80x9ccolumn addressxe2x80x9d. The terms in quotation signs mentioned here are the terms commonly used in technical sheets for DRAM or SDRAM type components.
Video processing applications, which are becoming increasingly common, need to access Image blocks, that are composed of a set of pixels from an image.
Such is the case, for example, for digital video data compression according to the MPEG standard, the acronym standing for Motion Picture Expert Group, where the elementary coding size of video data is an image block constituting a macroblock. During motion estimation, a step of the digital video compression process, a current image macroblock is compared with macroblocks of a reconstructed image that are stored in an SDRAM type memory to determine which reconstructed macroblock allows for the best correlation with the current image macroblock.
In the MPEG standard, the macroblocks are sets of data consisting of four blocks of 8xc3x978 luminance data elements and, for the 4:2:0 compression format, a macroblock is represented as two blocks of 8xc3x978 chrominance data elements, emanating from a section of 16xc3x9716 elements from the luminance component of the image.
Typically, motion estimation calculations are performed on the luminance values alone. The relevant blocks are then just the luminance blocks of overall size 16xc3x9716. These blocks are stored in the form of blocks of 16 pixelsxc3x978 lines, the luminance blocks of overall size 16xc3x9716 being previously separated into two blocks of 16 pixelsxc3x978 lines. These new blocks correspond to a first block of the upper frame and a second block of the lower frame in image mode grouping together two frames or to a first block grouping together the first 8 lines and a second block grouping together the next 8 lines of the same frame in frame mode. These luminance blocks of 16 pixelsxc3x978 lines are called, hereinafter, luminance semi-macroblocks or simply semi-macroblocks as to indicate that the grouping together of 2 luminance blocks of 8 pixelsxc3x978 lines, the term luminance macroblock being used to denote, in the MPEG standard, the 4 luminance blocks.
It is generally necessary to retrieve, from the memory, image blocks of a size greater than blocks of 16 pixelsxc3x978 lines. The size of the retrieved blocks is typically defined by the application using such blocks.
For example, the calculation of the motion vectors is carried out with a resolution of half a pixel requiring the processing of image blocks having an additional line and a column, that is to say of dimension 17 pixelsxc3x979 lines.
Another example relates to the search windows in a reconstructed image, in which the correlation of the blocks is performed having bigger or smaller dimensions depending on the process used for motion estimation. For a process designating, in a first step, a use of a search window on the basis of a motion vector, it is generally necessary, in a second step, to refine the search to perform a local adjustment, such a refinement being carried out on a window of small dimension. In one example, these search windows have a dimension of 24xc3x9712, corresponding to a horizontal excursion of xc2x14 and a vertical excursion of xc2x12 for blocks of 16xc3x978 pixels.
The access time to an entire block of larger size is not generally optimized, requiring access to several pages of the SDRAM memory as to read or write the values of pixels constituting this block.
FIG. 1 represents luminance macroblocks of size 16xc3x9716, a first 16xc3x9716 luminance macroblock 1 and a last 16xc3x9716 luminance macroblock 2 of one and the same horizontal row, that is to say of a horizontal succession of macroblocks over an image width. In the general case, a row of macroblocks corresponds to a slice, as defined in the MPEG standard. Hereinafter, the term row will be particularly used to define a succession of blocks or of semi-macroblocks over an image width, the term slice being reserved for the macroblocks.
Indicated on the abscissa axis are the pixel numbers and indicated on the ordinate axis are the line numbers. 16 video lines over an image width of 720 pixels correspond to 45 macroblocks of 16 pixels (720:16).
The semi-macroblocks are stored one after another according to a television type scanning, as indicated hereinafter.
FIG. 2 represents memory pages 4, 5, 6, 8 such as they are successively addressed during the storage of the semi-macroblocks. As indicated previously, the 16xc3x9716 macroblocks are stored into two parts, the upper blocks and the lower blocks.
If the upper blocks correspond to one frame and the lower blocks correspond to the next frame, that is to say in image mode, the upper blocks are stored one after another in a memory space and the lower blocks one after another in another memory space, each memory space thus corresponding to a frame.
If the upper and lower blocks correspond to one and the same frame, that is to say in frame mode, they are stored one after another, that is to say firstly the upper blocks of a row (of semi-macroblocks) then the lower blocks corresponding to the next row. The next frame is stored in another memory space.
The storage process is described for the frame mode and can be generalized without difficulty to the image mode. It is applied to each of the memory spaces, taken separately, by considering, for each of them, only the semi-macroblocks which are stored therein.
A page 4 can store, in our example, 8 semi-macroblocks MB referenced 3. The storage of the next 8 semi-macroblocks MB is performed in the next page 5 and so on and so forth. There is therefore, every 8 semi-macroblocks, a page change or skip 7 referred to as a xe2x80x9cpage missxe2x80x9d in the technical literature. Semi-macroblock No. 45, which corresponds to the end of the first row, is stored in the middle of a page referenced 6, more exactly as 5th semi-macroblock out of the 8 semi-macroblocks of the page.
The next semi-macroblock, which corresponds to the semi-macroblock at the start of the second row of the frame, is stored at the start of a new page 8 in the memory, the start-of-page storage of a start-of-row semi-macroblock being the simplest solution for handling the addresses.
FIG. 3 shows the drawbacks of such a prior art. The memory space is represented schematically as a function of the size of the semi-macroblocks 13 stored. The emboldened lines 12 correspond to the boundaries of pages, pages of dimension 8 blocks of 16xc3x978 pixels. Three overlaid complete pages are represented corresponding to groups of overlaid semi-macroblocks of three successive rows in the frame. Requiring to access image blocks of greater dimension than that of the semi-macroblocks stored, it is necessary to access several pages so as to read an image block. Thus, access to the block of 17 linesxc3x979 pixels, referenced 9, requires 4 page changes, access to block 10 of the same dimension, 2 page changes and access to block 11 of dimension 24 linesxc3x9712 pixels, 6 page changes. This calculation takes Into account the first page change that has to be performed, to access the block.
In this configuration, the maximum number of page changes for a block of dimension 17xc3x979 is 4, the maximum number of page changes for a block of dimension 24xc3x9712 is 6.
The memory write/read device must be configured in such a way as to take account of the maximum possible number of page changes. Thus, the greater this number, the greater the access times, even for access to a single page.
These page changes or more exactly the maximum possible number of page changes requires a configuration of the system which penalizes access time to the data stored and which therefore reduces the passband of the memory bus, which passband corresponds to the number of pixels which can be accessed in a given duration. A page change requires a certain number of clock cycles, thereby decreasing the access time.
The purpose of the invention is to alleviate the aforesaid drawbacks.
To this end, the subject of the invention is a process for storing digital video data of an image, the image being chopped into image blocks (h, v) consisting of v lines of h pixels, the set of blocks over an image width constituting a row, the data being stored as successive image blocks in an order corresponding to a television type scanning, in successive pages of a dynamic random access memory, for the reading of image blocks (H, V) consisting of V lines of H pixels, characterized in that the horizontal shift DI, I+a, in terms of number of blocks (h, v), of the boundary of a page corresponding to any row I of the image with respect to the boundary of a page corresponding to a row I+a is equal to:
DI, I+a=a D, ∀ positive integer a less than RM=INT [(Vxe2x88x922)/v]+2,
(INT corresponding to the integer part of the division)
the value D, which corresponds to the shift between two successive rows being chosen such that:
Dxe2x89xa7(BMxe2x88x921), with BM=INT [(Hxe2x88x922)/h]+2.
According to a particular mode of implementation, the process is characterized in that the shift is obtained by leaving memory spaces corresponding to one or more blocks (h, v) blank in the page storing the last blocks of a row.
The invention also relates to a process for estimating motion storing blocks (h, v) of dimensions h, v so as to obtain a reconstructed image in a memory and carrying out a comparison of a block of a current image with blocks (H, V) of dimension H, V of the stored reconstructed image, characterized in that the blocks (h, v) are stored in the pages of a memory of SDRAM type according to one of the processes described above.
The invention also relates to a correlation process performing a storage of image blocks (h, v) of dimensions h, v so as to obtain a reconstructed image in a memory, a reading of a search window (H, V) of the reconstructed image of dimension H, V so as to carry out a correlation of a block of a current image with an image block lying in the search window, characterized in that the blocks (h, v) are stored in the pages of a memory of SDRAM type according to one of the processes described above.
The invention also relates to a process for predicting an image block in a reconstructed image performing a storage of image blocks (h, v) of dimension h, v so as to obtain a reconstructed image, a prediction on the basis of a motion vector so as to define a block of dimension (H, V) in the reconstructed image, a reading of this block (H, V), characterized in that the blocks (h, v) are stored in the pages of a memory of SDRAM type according to one of the processes described above.
By virtue of the invention, the maximum number of page changes is limited and consequently the passband is improved. The access time to a block of pixels is optimized. The minimizing of the time of use of the memory bus, owing to the reduction in the overall transfer time, is particularly advantageous, the passband being an important limitation in the performance of the memory access devices nowadays employed.